drupal get route current content type

56

$node = \Drupal::routeMatch()->getParameter('node');
$typeName = $node->bundle();
$typeLabel = $node->getTitle();

Comments

Submit
0 Comments